﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using XiAnAirport.BUS;
using XiAnAirport.Models;

namespace XiAnAirport
{
    [Route("api/[controller]")]
    [ApiController]
    public class LiftDataSyncController : ControllerBase
    {
        [HttpPost]
        public ResponseMessage Post([FromBody] ThirdPartyData thirdPartyData)
        {
            ResponseMessage message = new ResponseMessage();
            try
            {
                LiftDataSyncBUS liftDataSyncBUS = new LiftDataSyncBUS();
                message = liftDataSyncBUS.ThirdPartyDataProcess(thirdPartyData);
            }
            catch (Exception ex)
            {
                LogHelper.Log(ex.ToString());
            }
            return message;
        }
    }
}
